package com.cust.zy.newtask.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zhuangyuan on 4/14/2017.
 * 邮箱：zhuangyuan.k@qq.com
 */
public class Task implements Parcelable {
    private String ID;
    private String name;
    private int type;
    private int numOfWord;
    private String generateTime;
    private String description;
    private String fileName;
    public Task() {

    }

    public Task(String ID, String name, int type, int numOfWord, String generateTime, String description, String fileName) {
        this.ID = ID;
        this.name = name;
        this.type = type;
        this.numOfWord = numOfWord;
        this.generateTime = generateTime;
        this.description = description;
        this.fileName = fileName;
    }

    protected Task(Parcel in) {
        ID = in.readString();
        name = in.readString();
        type = in.readInt();
        numOfWord = in.readInt();
        generateTime = in.readString();
        description = in.readString();
        fileName = in.readString();
    }

    public static final Creator<Task> CREATOR = new Creator<Task>() {
        @Override
        public Task createFromParcel(Parcel in) {
            return new Task(in);
        }

        @Override
        public Task[] newArray(int size) {
            return new Task[size];
        }
    };

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getNumOfWord() {
        return numOfWord;
    }

    public void setNumOfWord(int numOfWord) {
        this.numOfWord = numOfWord;
    }

    public String getGenerateTime() {
        return generateTime;
    }

    public void setGenerateTime(String generateTime) {
        this.generateTime = generateTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(ID);
        dest.writeString(name);
        dest.writeInt(type);
        dest.writeInt(numOfWord);
        dest.writeString(generateTime);
        dest.writeString(description);
        dest.writeString(fileName);
    }
}
